#pragma once

#include "CContainer.h"

NAMESPACE_UI_BEGIN

class UI_API CForm : public CContainer, public IForm
{
public:
	CForm();
	~CForm();

	const COID & GetOID() const;

	IControl * GetControl();
	IContainer * GetContainer();
	ILayerout * GetLayout();
	void OnShow();
	void OnHide();

	void SetFormPosition(const CPointInt32 & ptForm);
	const CPointInt32 & GetFormPosition() const;
	void SetFormSize(const CSizeInt32 & szForm);
	const CSizeInt32 & GetFormSize() const;

	void FormPositionChanged(CMoveArgument & args);
	void FormSizeChanged(CResizeArgument & args);

	void SetFormCaption(const char_16 * szCaption);
	const char_16 * GetFormCaption() const;

	void SetFormActive(bool bActive);
	bool IsFormActive() const;
protected:
	IBuffer * m_pBuffer;
	CRectInt32 m_rcForm;

	MoveEvent OnFormMove;
	ResizeEvent OnFormResize;

	bool m_bAcvtive;
};

NAMESPACE_UI_END
